home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-13 | 1001 b | 49 lines | [TEXT/EDIT] |
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- class TEST_OUT1
-
- creation make
-
- feature
-
- make is
- local
- any: ANY;
- do
- is_true((0).out.is_equal("0"));
- is_true((25).out.is_equal("25"));
-
- is_true((true).out.is_equal("true"));
- is_true((false).out.is_equal("false"));
-
- is_true(('A').out.is_equal("'A'"));
- is_true(('a').out.is_equal("'a'"));
-
- is_true((1.5).out.is_equal("1.5"));
-
- is_true(("foo").out.is_equal("%"foo%""));
-
- any := 3;
- is_true(("INTEGER_REF").is_equal(any.out.substring(1,11)));
-
- any := 'X';
- is_true(("CHARACTER_REF").is_equal(any.out.substring(1,13)));
- end;
-
- is_true(b: BOOLEAN) is
- do
- cpt := cpt + 1;
- if not b then
- std_output.put_string("TEST_OUT1: ERROR Test # ");
- std_output.put_integer(cpt);
- std_output.put_string("%N");
- else
- -- std_output.put_string("Yes%N");
- end;
- end;
-
- cpt: INTEGER;
-
- end -- TEST_OUT1
-